using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using QLKS.DTO;
using QLKS.BUS;


namespace QLKS.Presentation
{
    public partial class frmChiTietPhieuThue_QL : Form
    {
        ChiTietPhieuThue_BUS objCTPhieuThue = new ChiTietPhieuThue_BUS();
        public ChiTietPhieuThue_DTO ct_DTO = new ChiTietPhieuThue_DTO();

        //DataSet dsPhong = new DataSet();
        DataTable dtPhong = new DataTable();

        public frmChiTietPhieuThue_QL()
        {
            InitializeComponent();
            LoadListView();
        }

        public void LoadListView()
        {
            dtPhong = objCTPhieuThue.PhongTrongPhieuThue(ct_DTO);
            lvwPT.Items.Clear();
            foreach (DataRow dr in dtPhong.Rows)
            {
                ListViewItem it = new ListViewItem();
                it.Text = dr["SoPhieu"].ToString();
                it.SubItems.Add(dr["MaPhong"].ToString());
                it.SubItems.Add(dr["SoNguoi"].ToString());
                it.SubItems.Add(dr["Gia"].ToString());

                lvwPT.Items.Add(it);
            }
        }

        private void frmChiTietPhieuThue_QL_Load(object sender, EventArgs e)
        {
            LoadListView();
        }
    }
}